pkgname=fvwm-cjk
pkgver=2.5.27
pkgrel=1
pkgdesc="fvwm窗口管理器，加入了多国文字渲染补丁"
arch=('i686' 'x86_64')
url="http://www.fvwm.org"
license=('GPL' 'custom')
depends=('imlib' 'fribidi' 'perl' 'libstroke' 'libxpm' 'readline' 'librsvg')
makedepends=('pkgconfig')
conflicts=('fvwm' 'fvwm-devel')
provides=("fvwm-devel=${pkgver}")
source=(ftp://ftp.fvwm.org/pub/fvwm/version-2/fvwm-${pkgver}.tar.bz2 fvwm.desktop 
         fvwm.cjk.diff.tar.gz::http://forum.ubuntu.org.cn/download/file.php?id=56775)
md5sums=()

build() {
  cd ${srcdir}/fvwm-${pkgver}
  patch -Np0 -i ${srcdir}/fvwm.cjk.diff || return 1
  ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --with-stroke
  make || return 1
  make DESTDIR=${pkgdir} install

  install -d ${pkgdir}/etc/fvwm
  install -D -m644 sample.fvwmrc/* ${pkgdir}/etc/fvwm
  rm -f ${pkgdir}/etc/fvwm/{Makefile,Makefile.am,Makefile.in}
  install -D -m644 ../fvwm.desktop ${pkgdir}/etc/X11/sessions/fvwm.desktop
  install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
}
